package com.nl.module_main.Junit

import org.junit.After
import org.junit.Before
import org.junit.BeforeClass
import org.junit.Test

/**
 * 作者: wangfei
 * 创建时期: 2022/11/30.
 * 包名: com.nl.module_main.Junit
 * 类名: NL_MedicaleEvaluation
 */
class KotlinTestUtils{

    companion object{
        @JvmStatic
        private val strings = listOf("this","is","a","list","of","strings")

        @BeforeClass
        @JvmStatic
        fun  runBefore(){
            println("BeforeClass: $strings")
        }
    }

    private val modifiable = ArrayList<Int>()

    @Before
    fun initialize(){
        println("Before: $modifiable")
        modifiable.add(1)
        modifiable.add(2)
        modifiable.add(3)
        modifiable.add(4)
        modifiable.add(5)
    }

    /**
     * 密封类
     */
    @Test
    fun test1(){
        val src:Test01 = Test01.test02()
        //src.hello()
        val src02:Test01 = Test01.test03()
        src02.hello()
    }

    /**
     * 密封类
     */
    sealed class Test01(){
        class test02():Test01()
        class test03():Test01()
        fun hello(){
            println("hello world ....")
        }
    }


    @After
    fun finish(){
        println("After: $modifiable")
    }


















}